package com.milo.thread.create;


/**
 * @author milo
 * @date 2019/4/2014:57
 * @description 继承Thread类方式创建多线程
 */
public class MyThread extends Thread {

    private String name;

    public MyThread(String name) {
        this.name = name;
    }

    @Override
    public void run() {
        System.out.println(name + "执行了");

    }

    public static void main(String[] args) {
        MyThread mt1 = new MyThread("线程1");
        mt1.start();

    }
}
